package trong.gold.soft.com.view.game;

import trong.gold.soft.com.main.mTetrisMidlet;
import trong.gold.soft.com.model.Resources;
import trong.gold.soft.com.model.createImg;
import trong.gold.soft.com.model.drawBackgr;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class teamTetris extends Canvas{
	private Image backgr,khung;
	private String khungName = "man3.png";
	private static final int TOP_LEFT_ANCHOR = Graphics.TOP | Graphics.LEFT;
	
	private int resize;
	
	private mTetrisMidlet midlet;
	private drawBackgr back;
	public teamTetris(mTetrisMidlet midlet){
		setFullScreenMode(true);
		this.midlet = midlet;
		back = new drawBackgr();
		backgr = createImg.createImage("/com/image/" + Resources.backgrName);
		khung = createImg.createImage("/com/image/imggame/" + khungName);
		resize = (this.getWidth() * 110) / 240;
	}
	protected void paint(Graphics g) {
		drawNextStep(g);
		g.drawImage(khung, 0, 0, TOP_LEFT_ANCHOR);
	}
	private void drawNextStep(Graphics g) {
		clearAll(g);
		drawBackGround(g);
		drawScore(g);
		drawNextBlock(g);
		updateMap();
		drawMap(g);
//		drawhotgirl(g);
		getghosty(g);
//		drawtouch(g);
	}
	private void getghosty(Graphics g) {
		// TODO Auto-generated method stub
		
	}
	private void drawMap(Graphics g) {
		// TODO Auto-generated method stub
		
	}
	private void updateMap() {
		// TODO Auto-generated method stub
		
	}
	private void drawNextBlock(Graphics g) {
		// TODO Auto-generated method stub
		
	}
	private void drawScore(Graphics g) {
		// TODO Auto-generated method stub
		
	}
	private void drawBackGround(Graphics g) {
		// TODO Auto-generated method stub
		
	}
	private void clearAll(Graphics g) {
		back.drawbackgr(this.getWidth(), this.getHeight(), 1, backgr, g, 40, 60);
		
	}
}